package kr.hkit.powerjava.chapter24.main;

import java.util.Scanner;

import kr.hkit.powerjava.chapter24.dao.DepartmentDAO;
import kr.hkit.powerjava.chapter24.dao.StudentDAO;
import kr.hkit.powerjava.chapter24.service.ServiceDepartment;
import kr.hkit.powerjava.chapter24.service.ServiceStudent;


public class ERP {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		boolean flag = true;
		while(flag) {
			System.out.println("1. 학생정보 2. 부서정보 3. 종료");
			switch(sc.nextInt()) {
				case 1:
					new ServiceStudent(new StudentDAO(), sc);
					break;
				case 2:
					new ServiceDepartment(new DepartmentDAO(), sc);
					break;
				default : 
					flag = false;
					
			}
		}
		sc.close();
	}
}